﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

//* Write a program that converts a number in the range [0...999] to a text corresponding to its English pronunciation. Examples:
//    0  "Zero"
//    273  "Two hundred seventy three"
//    400  "Four hundred"
//    501  "Five hundred and one"
//    711  "Seven hundred and eleven"


namespace _11NumberToText
{
    class _11NumberToText
    {
        static void Main(string[] args)
        {
            Console.WriteLine("Enter numbre in the range 0 to 999:");
            string inputString = Console.ReadLine();
            int n = int.Parse(inputString);

            int ones = n % 10;
            int tenths = (n / 10) % 10;
            int hundredths = (n / 100) % 10;
            Console.WriteLine("The number you entered {0} has {1} hundredths, {2} tenths and {3} ones.", n, hundredths, tenths, ones);
            //I know that this is not the required answer, but so far my knowledge is limited to this. If I figure it out in the meantime I'll upload an updated version of this homework.
            Console.ReadLine();
        }
    }
}
